import request from '@/utils/request'

//三级分类 GET /admin/product/getCategory1
export const getCategory1Id=()=>request({url:'/admin/product/getCategory1',method:'get'})

export const getCategory2Id=(category1Id)=>request({url:`/admin/product/getCategory2/${category1Id}`,method:'get'})

export const getCategory3Id=(category2Id)=>request({url:`/admin/product/getCategory3/${category2Id}`,method:'get'})
//GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
export const getAttrInfoList=(category1Id,category2Id,category3Id)=>request({url:`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,method:'get'})

//保存商品属性/admin/product/saveAttrInfo post
export const saveOrUpdateAttrInfo=(data)=>request({url:'/admin/product/saveAttrInfo',method:'post',data})